package com.bristua.order.biz;

import com.bristua.order.dao.TOrderMapper;
import com.bristua.order.model.TOrder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2019/4/26.
 */
@Transactional
@Service
public class OrderDeliverGoodsBiz {

    @Resource
    private TOrderMapper tOrderMapper;

    public void orderDeliverGoods(String orderId,String logisticsNumber){
        TOrder tOrder = tOrderMapper.selectByPrimaryKey(orderId);
        if(tOrder!=null){
            tOrder.setDeliverySn(logisticsNumber);
            tOrder.setSendStatus("2");
            tOrder.setConfirmStatus("1");
            tOrderMapper.updateByPrimaryKeySelective(tOrder);
        }
    }
}
